package com.huobi.client.model.enums;

import com.huobi.client.impl.utils.EnumLookup;

/**
 * sys, web, api, app.
 */
public enum OrderSource {
  SYS("sys"),
  WEB("web"),
  API("api"),
  APP("app"),
  MARGINAPI("margin-api"),
  SPOTAPI("spot-api"),
  INVALID("invalid");

  private final String code;

  OrderSource(String code) {
    this.code = code;
  }

  @Override
  public String toString() {
    return code;
  }

  private static final EnumLookup<OrderSource> lookup = new EnumLookup<>(OrderSource.class);

  public static OrderSource lookup(String name) {
    return lookup.lookup(name);
  }
}
